const fs = require('fs');
const path = require('path');

const readStream = fs.createReadStream('data.txt');
const writeStream = fs.createWriteStream('data-bak.txt');
readStream.pipe(writeStream);
readStream.on('data', () => {
    console.log('copy done');
})
